/**
 * @(#) TeamProfileFacade.as
 *
 * @date		2009. 02. 26.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @description	module facade (구성원 인사기록조회)
 * 				mvc간 주고 받는 메세지를 정의하고,  command를 등록한다. 
 */
package com.skt.common_hr.mintview
{
	import com.skt.common_hr.common.puremvc.CommonFacade;
	import com.skt.common_hr.mintview.controller.StartupCommand;
	
	public class MintViewFacade extends CommonFacade
	{
		public static const STARTUP:String 						= 'startup';
		public static const CLOSE_MODULE:String					= 'closeModule';
		
		public static const LOAD_TEAMVACATION_COMPLETE:String	= "LOAD_TEAMVACATION_COMPLETE";
		public static const LOAD_VACATION_QUOTA_COMPLETE:String	= "LOAD_VACATION_QUOTA_COMPLETE";
		
		public static const LOAD_MEMBERSEARCH_COMPLETE:String	= "loadMembersearchComplete";
		public static const LOAD_MEMBERSEARCH_FAILED:String		= "loadMembersearchFailed";
		
		public static const LOAD_CODELIST_COMPLETE:String		= "loadCodeListComplete";
		public static const LOAD_CODELIST_FAILED:String			= "loadCodeListFailed";
		
		public static const LOAD_PRIVATELIST_COMPLETE:String		= "loadPrivateListComplete";
		public static const LOAD_PRIVATELIST_FAILED:String			= "loadPrivateListFailed";
		
		public static const LOAD_BTNCHECK_COMPLETE:String		= "loadBtnCheckComplete";
		public static const LOAD_BTNCHECK_FAILED:String			= "loadBtnCheckFailed";
		
		public static const LOAD_NAMESEARCH_COMPLETE:String		= "loadNameSearchComplete";
		public static const LOAD_NAMESEARCH_FAILED:String		= "loadNameSearchFailed";
		
		public static const LOAD_ORGLIST_COMPLETE:String		= "loadOrglistComplete";
		public static const LOAD_ORGLIST_FAILED:String			= "loadOrglistFailed";
		public static const LOAD_PROFILE_COMPLETE:String		= "loadProfileComplete";
		public static const LOAD_PROFILE_FAILED:String			= "loadProfileFailed";
		public static const LOAD_PROFILE_DETAIL_COMPLETE:String	= "loadProfileDetailComplete";
		public static const LOAD_PROFILE_DETAIL_FAILED:String	= "loadProfileDetailFailed";
		public static const LOAD_PROFILE_PRCARD_CHECK_COMPLETE:String	= "loadProfilePrCardCheckComplete";
		public static const LOAD_PROFILE_PRCARD_CHECK_FAILED:String	= "loadProfilePrCardCheckFailed";
		
		public static const CLOSED_REQUEST_VIEW:String			= "closedRequestView";
		
		public static const CHANGE_SELECTED_MEMBER:String		= "changeSelectedMember";
		
		public static const LOAD_NOTICE_COMPLETE:String				= "loadNoticeComplete";
		public static const LOAD_NOTICE_FAILED:String				= "loadNoticeFailed";
		public static const INSERT_NOTICE_COMPLETE:String			= "InsertNoticeComplete";
		public static const INSERT_NOTICE_FAILED:String				= "InsertNoticeFailed";
		public static const UPDATE_NOTICE_COMPLETE:String			= "UpdateNoticeComplete";
		public static const UPDATE_NOTICE_FAILED:String				= "UpdateNoticeFailed";
		public static const LOAD_KEY_COMPLETE:String				= "loadKeyComplete";
		public static const LOAD_KEY_FAILED:String					= "loadKeyFailed";
		public static const UPDATE_COUNT_COMPLETE:String			= "updateCountComplete";
		public static const UPDATE_COUNT_FAILED:String				= "updateCountFailed";
		public static const MODE_LIST_NOTICE:String					= "modeListNotice";
		public static const MODE_VIEW_NOTICE:String					= "modeViewNotice";
		public static const MODE_WRITE_NOTICE:String				= "modeWriteNotice";
		public static const MODE_MODIFY_NOTICE:String				= "modeModifyNotice";
		public static const WRITE_SEARCH_NOTICE:String				= "writeSearchNotice";
		public static const WRITE_SEARCH_NOTICE_COMPLETE:String		= "writeSearchNoticeComplete";
		public static const LOAD_LIST_NEW_VIEW:String				= "loadListNewView";
		public static const LOAD_DELETE_MEDIATOR:String			= "loadDeleteMediator";
		
		public static const FILE_UPLOAD_FILENAME:String				= "FILE_UPLOAD_FILENAME";
		
		public function MintViewFacade( key:String )
		{
			super(key);	
		}
        
        /**
         * Singleton ApplicationFacade Factory Method
         */
        public static function getInstance( key:String ) : MintViewFacade 
        {
            if ( instanceMap[ key ] == null ) instanceMap[ key ] = new MintViewFacade( key );
            return instanceMap[ key ] as MintViewFacade;
        }
       
        /**
         * Register Commands with the Controller 
         *     - parent 클래스의 생성자에서 자동으로 호출됨
         */
        override protected function initializeController( ) : void {
            super.initializeController();            
            registerCommand( STARTUP, StartupCommand);
        }
       
        /**
         * Module의 시작점으로 Certificate.mxml의 creationComplete 이벤트에서 호출한다.
         *     
         */
        public function startup(app:Object) :void 
        {
        	trace("send startup in Team Profile");
        	this.app = app as MintView;
            sendNotification( STARTUP, app );
        }
		
	}
}